<extend name="Base/common"/>
<block name="body">
    <div class="insurance">
        <div class="width1000">
            <img src="__PUBLIC__/Home/images/insurance1.png" alt="广告" class="ins_ad_img" />
            <div class="ins_tab">
                <a href="javascript:void(0);" class="f_l ins_tab_li">定制我的车险</a>
                <a href="try_count.html" class="f_l">试算我的保费</a>
            </div>
            <form action="{:U('step3')}" method="post" class="form_all" id="forms">
            <volist name="vhlmodel_list" id="model">
                <input type="radio" name="model_indx" value="{$key}">
                    车型代码:{$model.C_VEHICLE_CODE}<br />
                    车型名称:{$model.C_VEHICLE_NAME}<br />
                    品牌名称:{$model.C_VEHICLE_BRAND}<br />
                    新车购置价:{$model.N_VEHICLE_PRICE}<br />
                    核定载客人数:{$model.N_LIMIT_LOAD_PERSON}<br />
                    排气量:{$model.C_EXT_MSR}<br />
            </volist>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">商业险-保险起期</span>
                    </div>
                    <div class="span7 f_l">
                        <input type="text" name="t_insrnc_bgn_tm" class="text datePicker" />
                        <span class="help_msg"></span>
                    </div>
                </div>
                <input type="submit" value="下一步" class="form_submit" />
            </form>
        </div>
    </div>
    </block>
<block name="script">
<script type="text/javascript" src="__PUBLIC__/Home/js/insurance.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/carCommen.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/datePicker.js"></script>
<script type="text/javascript">
    /*时间控件*/
    $(function(){
        $(".datePicker").each(function(){
            $(this).datepicker({
                format: "yyyy-mm-dd",
                todayBtn: "linked",
                language: "zh-CN",
                autoclose: true,
                todayHighlight: true
            });
        }); 
    });
</script>
<script type="text/javascript">
    $(document).ready(function(){
        $('#forms').validate({
            rules: {
                car_type: "required",
                shortName_: "required"
            },
            messages: {
                car_type: "请选择车辆类型" ,
                shortName_: "请填写商品名称简写",
            },  
            showErrors: function(errorMap, errorList) { 
                $.each( errorList, function(i,v){
                    if(v.message!=""){ 
                        $(this.element).parent().parent().addClass('has_error');
                        $(this.element).nextAll(".help_msg").html(v.message);
                    }
                });  
            },
            /* 失去焦点时不验证 */
            onfocusout: false
        });
        $('#form1').find('input,select,textarea').on('change',function(){ 
            $(this).parent().parent().removeClass('has_error');
            $(this).nextAll(".help_msg").html("");
        });
    })
</script>
</block>
